<!-- 综合查询(通信、信息化) -->
<template>
  <div>
    <!--
        * 如需用此页面,请自行补充
        prjId
        type: done
        prjType == 项目类型
            1.['A', 'B', 'C', 'G', 'Z'], //通信: A = 铁塔类项目, B = 室分类项目, C = 传输类项目, G = 微姑类项目, Z = 整体项目 ||
            2.M = 信息化

        prjStatus == 项目阶段
            Q: 结算
            G: 决算

        processInstId == 查看流程图需要参数
    -->
    <component :is="pageNameUrl" />
  </div>
</template>
<script>
import { getQueryObject, setDocTitle } from '@/utils' // 获取url地址信息

import ActualBudgetDetail from '@/views/actualBudget/actualBudgetDetail' // 信息化类决算页面
import TFinInfoForm from '@/views/actualBudget/communication/tFinInfoForm' // 通信类决算页面
import settlementManagement from '@/views/balance/index.vue' // 通信类结算页面

const config = [
  {
    prjSta: ['G'],
    prjTy: ['M'],
    iframeUrl: 'ActualBudgetDetail' // 信息化类决算页面
  },
  {
    prjSta: ['G'],
    prjTy: ['A', 'B', 'C', 'G', 'Z'],
    iframeUrl: 'TFinInfoForm' // 通信类决算页面
  },
  {
    prjSta: ['Q'],
    prjTy: ['A', 'B', 'C', 'G', 'Z'],
    iframeUrl: 'settlementManagement' // 通信类结算页面
  }
]
export default {
    name: 'IntegratedQueryActualBudget',
    components: {
        ActualBudgetDetail,
        TFinInfoForm,
        settlementManagement
    },
    data() {
        return {
            // pageName: '',
            urlList: {}
        }
    },
    computed: {
        pageNameUrl() {
            // 获取当前节点是结算或其他 且 当前节点是信息化或其他
            const list = config.find(item => item.prjSta.includes(this.urlList.prjStatus) && item.prjTy.includes(this.urlList.prjType))
            return list.iframeUrl
        }
    },
    created() {
        const { prjId, type, prjType, prjStatus } = getQueryObject()
        this.urlList = {
            prjId,
            type,
            prjType,
            prjStatus
        }
    },
    methods: {
    }
}
</script>

<style>
</style>

